#if (FEATURE_MODE == 0)

/**
 @file ctc_tmx_sc_oam.h

 @author  Copyright (C) 2018 Centec Networks Inc.  All rights reserved.

 @date 2019-4-12

 @version v6.0

This chapter describes the SC OAM(Slicing Packet Network Channel OAM) defined by China Mobile that provides some mechanisms which can detect and recover
faults to keep the networks steady in SPN Channel.The Centec SC OAM module includes the block types as below:

\b
\B BAS block
\p
BAS block is used for sending based OAM block that including the functions of Continuity Check (CC), BIP Check, RDI, REI, CS_LF and CS_RF.The send interval of BAS
block contains 16k. 32k, 64k and 512k.

\b
\B APS block
\p
 APS block is used for automatic protection switching upon working path failure.The range of  APS block send interval is 1~60 seconds, and the default value is 1 second.

\b
\B CV block
\p
 CV block is used for Continuity Check.The range of  CV block send interval is 1~60 seconds, and the default value is 10 seconds.

\b
\B CS block
\p
CS block is used for instructing the type of users' signal. The range of  CS block send interval is 1~60 seconds, and the default value is 10 seconds.

\b
\B DM block
\p
Use One-way Delay Measurement (1DM) to do One-way frame delay measurement, and use Delay Measurement
Message (DMM) and Delay Measurement Reply (DMR) to do Two-way frame delay measurement.The range of  CS block send interval is 1~60 seconds,
and the default value is 1 seconds.

*/

#ifndef _CTC_USW_SC_OAM_H
#define _CTC_USW_SC_OAM_H
#ifdef __cplusplus
extern "C" {
#endif

/****************************************************************************
 *
 * Header Files
 *
****************************************************************************/
#include "ctc_sc_oam.h"

/****************************************************************************
*
* Defines and Macros
*
****************************************************************************/

/****************************************************************************
 *
* Function
*
****************************************************************************/
/**
 @addtogroup oam SC_OAM
 @{
 */

/**
 @brief   Add SPN Channel OAM mep

 @param[in] lchip_id    local chip id

 @param[in]  p_mep   mep data structure pointer

 @remark[TMM]

 @return CTC_E_XXX

*/
extern int32
ctc_tmx_sc_oam_add_mep(uint8 lchip_id, ctc_sc_oam_mep_t* p_mep);

/**
 @brief   Remove SPN Channel OAM mep

 @param[in] lchip_id    local chip id

 @param[in]  p_mep   local mep data structure pointer

 @remark[TMM]

 @return CTC_E_XXX

*/
extern int32
ctc_tmx_sc_oam_remove_mep(uint8 lchip_id, ctc_sc_oam_mep_t* p_mep);

/**
 @brief   Update SPN Channel OAM mep

 @param[in] lchip_id    local chip id

 @param[in]  p_mep   local mep data structure pointer

 @remark[TMM]

 @return CTC_E_XXX

*/
extern int32
ctc_tmx_sc_oam_update_mep(uint8 lchip_id, ctc_sc_oam_mep_t* p_mep);

/**
 @brief   Get SPN Channel OAM mep configuration

 @param[in] lchip_id    local chip id

 @param[in][out]  p_mep   local mep data structure pointer

 @remark[TMM]

 @return CTC_E_XXX

*/
extern int32
ctc_tmx_sc_oam_get_mep(uint8 lchip_id, ctc_sc_oam_mep_t* p_mep);

/**
 @brief   Update SPN Channel OAM mep property

 @param[in] lchip_id    local chip id

 @param[in]  p_mep_prop   mep property structure pointer

 @remark[TMM]

 @return CTC_E_XXX

*/
extern int32
ctc_tmx_sc_oam_set_mep_property(uint8 lchip_id, ctc_sc_oam_mep_prop_t* p_mep_prop);

/**
 @brief   Get SPN Channel OAM mep property

 @param[in] lchip_id    local chip id

 @param[in][out]  p_mep_prop   mep property structure pointer

 @remark[TMM]

 @return CTC_E_XXX

*/
extern int32
ctc_tmx_sc_oam_get_mep_property(uint8 lchip_id, ctc_sc_oam_mep_prop_t* p_mep_prop);

/**
 @brief   Get MEP information from ASIC dataset

 @param[in] lchip_id    local chip id

 @param[in|out] p_mep_info    MEP info pointer

 @remark[TMM]

 @return CTC_E_XXX
*/
extern int32
ctc_tmx_sc_oam_get_mep_info(uint8 lchip_id, ctc_sc_oam_mep_info_t* p_mep_info);

/**
 @brief   Set oam property of oam enable and others

 @param[in] lchip_id    local chip id

 @param[in] p_prop property structure pointer

 @remark[TMM]

 @return CTC_E_XXX

*/
extern int32
ctc_tmx_sc_oam_set_property(uint8 lchip_id, ctc_sc_oam_prop_t* p_prop);

/**
 @brief   Get oam property of oam enable and others

 @param[in] lchip_id    local chip id

 @param[in|out] p_prop property structure pointer

 @remark[TMM]

 @return CTC_E_XXX

*/
extern int32
ctc_tmx_sc_oam_get_property(uint8 lchip_id, ctc_sc_oam_prop_t* p_prop);

/**
 @brief   Initialization for SPN Channel OAM

 @param[in] lchip    local chip id

 @param[in] p_cfg global configuration for oam pointer

 @remark[TMM]

 @return CTC_E_XXX

*/
extern int32
ctc_tmx_sc_oam_init(uint8 lchip, void* p_cfg);


/**
 @brief   deinit for SPN Channel OAM module

 @param[in] lchip    local chip id

 @remark[TMM] local chip id

 @return CTC_E_XXX

*/
extern int32
ctc_tmx_sc_oam_deinit(uint8 lchip);

/**@} end of @addtogroup oam SC_OAM*/
#ifdef __cplusplus
}
#endif

#endif

#endif
